Embodiments of the invention relate generally to user interfaces that provide a list of thumbnail items to allow a user to access media items associated with the thumbnail items, and in particular to memory management techniques for displaying the thumbnail items with low latency and improved user experience.
Various types of software applications allow users to access, interact with, and/or modify media items. The types of software applications that can be used to access media items depend on the types of media items being accessed, which may include, without limitation, still images, videos, audio content, textual content, games and other software programs, and any combinations thereof. An image viewer application is one example of a software application that allows users to browse still images (and possibly other types of media, including videos). The image viewer may also allow a user to perform basic editing tasks on the images or other media being viewed. Other examples include media players that allow users to view or play media content, such as videos and music files, and web browsers that allow users to view web pages and access media content contained on the web page.
The media content that can be accessed may include a large number of media items from one or more sources. For example, an image viewer may be used to view still images from various digital photo albums, each of which may include hundreds (or more) still images. The user interfaces for presenting these items typically also include some mechanism to allow a user to select a particular one or more items to view and/or edit. In the image viewer application context, for example, a thumbnail image (or simply, “thumbnail”) for each of the images may be presented in a list of thumbnails. A user can scroll the list of thumbnails and select a thumbnail from the list, which may then cause the image viewer application to show the associated image in its full form. Similar user interfaces exist for the other types of media items, where a particular media item (e.g., an image) can be selected by selecting its corresponding thumbnail item (e.g., a thumbnail image). Another common example is a web page that displays thumbnail images, which can be selected (e.g., by clicking on the thumbnail) to bring up the image, video, or other content associated with the thumbnail.
The interfaces described above are intuitive and helpful for many applications, but the hardware limitations of the devices on which they run can result in undesirable delays for the user. Such hardware limitations may include device memory, processing power, and network bandwidth. For example, existing image viewer applications load thumbnails in temporal order from a top position to a bottom position in the list, and this list may include many more thumbnails than can be displayed on the screen at any one time. If the application opens the list of thumbnail items at a position other than the top of the list, the user will have to wait for thumbnail items above to load into memory before the user will be shown the selected or “current” thumbnail item. This latency, which can be significant depending on the size of the list and the capabilities of the device, is undesirable for the user.
In addition, due to memory limitations of the device and/or the amount of memory allocated to the image viewer application, the device may not be able to load all of the thumbnail images into its memory. The application must then decide which thumbnails to purge when new ones are to be loaded. Existing applications do not employ any kind of intelligent technique to select which thumbnails to purge, and they likely load and purge using a simple first-in-first-out (FIFO) technique. But this does not account for the likely next actions by the user, who is likely scroll the list of thumbnails from a current position in one direction or the other. If the user has been scrolling down the list, the thumbnails above the current location may be loaded into memory, whereas the thumbnails below this position may not be. Accordingly, if the user continues to scroll down the list, the user will have to wait as the device loads the new thumbnails into memory before they are displayed in the list. The result is that thumbnail items relatively far from the current scroll position in the list are loaded into memory while thumbnail items relatively close to the current scroll position are not. This, too, results in a user experience with an undesirable latency, as the user must wait while the thumbnail items are loaded into memory.
Because the loading and processing of thumbnail items—as well as the media items themselves—can lead to significant latencies (especially when compressed formats such as JPEG are used), strategies are needed to deal with these latencies and with the resource limitations of the device on which the media application is run.